#include "udp_Server.hpp"
#include <iostream>
#include <memory>

void Resage(const std::string &str)
{
    std::cerr<<"请输入："<<str.c_str()<<" 端口号 "<<std::endl;
    exit(0);
}

int main(int argc,char*argv[])
{
    if(argc!=2)
    {
        Resage(argv[0]);
    }
    uint16_t port=std::stoi(argv[1]);
    EnableConsolseSyncStrategy();
    std::unique_ptr < Server > user= std::make_unique<Server>(port,[]()->{});
    user->Init();
    user->Start();
    return 0;
}